<%@page import="aex.domain.ArticleCategory"%>
<%@page import="aex.util.Ptool"%>
<%@page import="aex.domain.CategoryEditer"%>
<%@page import="aex.domain.Puser"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE>
<html>
<head>

<base href="<%=basePath%>">
<meta charset="utf-8">
<meta name="renderer" content="webkit|ie-comp|ie-stand">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport"	content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link rel="shortcut icon" href="images/favicon.ico" type="image/x-icon" />
<!--  -->
<!--[if lt IE 9]>
<script type="text/javascript" src="http://libs.useso.com/js/html5shiv/3.7/html5shiv.min.js"></script>
<script type="text/javascript" src="http://libs.useso.com/js/respond.js/1.4.2/respond.min.js"></script>
<script type="text/javascript" src="http://cdn.bootcss.com/css3pie/2.0beta1/PIE_IE678.js"></script>
<![endif]-->
<!--[if IE 7]>
<link href="http://www.bootcss.com/p/font-awesome/assets/css/font-awesome-ie7.min.css" rel="stylesheet" type="text/css" />
<![endif]-->
<!--[if IE 6]>
<script type="text/javascript" src="systemJs/DD_belatedPNG_0.0.8a-min.js" ></script>
<script>DD_belatedPNG.fix('*');</script>
<![endif]-->



	<link rel="stylesheet" type="text/css" href="systemStyle/H-ui.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/aex_userPage.css">
	<link rel="stylesheet" type="text/css" href="expandStyle/index.css" />
	<link rel="stylesheet" type="text/css" href="expandStyle/group_articles.css">
	
	<link rel="stylesheet" type="text/css" href="expandStyle/article.css" />
<link rel="stylesheet" type="text/css" href="expandStyle/tab.css" />
	
	<script type="text/javascript" src="http://libs.useso.com/js/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="expandStyle/aex_userPage.js"></script>
	<script type="text/javascript" src="expandStyle/tab.js"></script>


<title>${webTitle}网站管理后台</title>
</head>

<body>
	
	
	<!--导航栏-->
    
    <%
    	Puser user=(Puser)request.getSession().getAttribute("user");
    	if(user==null){
    		%>
    			<jsp:include page="/systemPage/headNavVisitor1.jsp"></jsp:include>		
    		<%
    	}else{
    		%>
				<jsp:include page="/systemPage/headNavVisitor2.jsp"></jsp:include>
    		<%
    	}
    %>
    
	
 <!--主要内容-->
 <div class="container">
     <div class="container_left">
         <!--当前位置-->
         <div id="place_here">
            当前位置 > <a href="index.html">广场</a> > <a href="#">${category.acName}</a>
         </div>
        <!--选项卡-->
        <div class="tab1" id="tab1">
           <div class="menu" id="menu_id">
                <ul>
                  <li id="one1" class="off" onclick="setTab('one',1)">药物</li>
                  <li id="one2" onclick="setTab('one',2)">疗法</li>
                  <li id="one3" onclick="setTab('one',3)">病因</li>
                  <li id="one4" onclick="setTab('one',4)">鉴别</li>
                  <li id="one5" onclick="setTab('one',5)">治疗</li>
                  <li id="one6" onclick="setTab('one',6)">并发症</li>
                  <li id="one7" onclick="setTab('one',7)">预防</li>
                </ul>
           </div>
           <div class="menudiv">
                <div id="con_one_1">
                     <div class="con1_tittle con1_tittle1">
                         <div style="width:190px;">药物名称</div>
                         <div>疗效</div>
                         <div>安全度</div>
                         <div>性价比</div>
                         <div>关注度</div>
                     </div>
                     
                     <!-- 药物展示  -->
					<c:forEach var="medicines" items="${category.medicineses}" varStatus="status">  
					
						<c:if test="${status.index<6 }">
						<div class="con1_tittle">
                         <div style="width:190px;"><a href="visitor/visitor_medicine.do?id=${medicines.meId}">${medicines.meName}</a></div>
                        
                         <div>
                           <ul>
                           <c:forEach var="i" begin="1" end="5" step="1">
                           		<c:if test="${i<= medicines.meEffect}">
                           			<li class="color_shuye"></li>
                           		</c:if>
                           		<c:if test="${i>medicines.meEffect}">
                           			 <li class='shuye'></li>
                           		</c:if>
							</c:forEach>
                           </ul>
                         </div>
                         
                         <div>
                           <ul>
                           <c:forEach var="i" begin="1" end="5" step="1">
                           		<c:if test="${i<= medicines.meSafety}">
                           			<li class="color_dunpai"></li>
                           		</c:if>
                           		<c:if test="${i>medicines.meSafety}">
                           			 <li class='dunpai'></li>
                           		</c:if>
							</c:forEach>
                           </ul>
                         </div>
                         
                         <div>
                           <ul>
                           <c:forEach var="i" begin="1" end="5" step="1">
                           		<c:if test="${i<= medicines.mePrice}">
                           			<li class="color_luoquan"></li>
                           		</c:if>
                           		<c:if test="${i>medicines.mePrice}">
                           			 <li class='luoquan'></li>
                           		</c:if>
							</c:forEach>
                           </ul>
                         </div>
                         
                         <div>${medicines.meAttention }</div>
                     </div> 
						</c:if>
					</c:forEach>                     
                     <div class="more_special"><a href="visitor/visitor_medicineList.do?id=${category.acId}">查看更多</a></div>     
                 </div>
                  <div id="con_one_2" style="display:none;">
                 <!-- 疗法展示  -->
                 <c:forEach var="therapie" items="${category.therapies}" varStatus="status">
                 	  <c:if test="${status.index<2 }">
	                     <div class="con2_suggestions">
	                        <span>1</span>
	                        <p><a href="visitor/visitor_therapyList.do?id=${category.acId}">${therapie.thMethod }</a></p>
	                        <div class="con2_help">${therapie.thUseful }的朋友认为有帮助</div>
	                     </div>
	                     <div class="con2_intrution">
	                      	${therapie.thMethod }
	                     </div>
                 	  </c:if>
                 </c:forEach>
                     <div class="more_special"><a href="topics.html">查看更多</a></div>     
                 </div>
                 <div id="con_one_3" style="display:none;">
                     <div class="con3_content">
                         <h2>发病原因</h2>
                         <div>
                          	${category.acReason}
                         </div>
                     </div>
                      <div class="more_special"><a href="topics.html">查看更多</a></div>  
                 </div>
                 <div id="con_one_4" style="display:none;">
                      <div class="con4_content">
                         <h2>诊断</h2>
                         <div>
                   			 ${category.acDistingguish}
                         </div>
                     </div>
                      <div class="more_special"><a href="topics.html">查看更多</a></div>  
                 </div>
                 
                  <div id="con_one_5" style="display:none;">
                       <div class="con5_content">
                         <h2>治疗</h2>
                         <div>
                           ${category.acTreat}
                         </div>
                     </div>
                      <div class="more_special"><a href="topics.html">查看更多</a></div>                 
                 </div>
                 
                 <div id="con_one_6" style="display:none;">
                      <div class="con6_content">
                         <h2>并发症</h2>
                         <div>
                            ${category.acComplication}
                         </div>
                     </div>
                      <div class="more_special"><a href="topics.html">查看更多</a></div>
                 </div>
                 
                 <div id="con_one_7" style="display:none;">
                       <div class="con7_content">
                         <h2>预防</h2>
                         <div>
                          	${category.acTreat}
                         </div>
                     </div>
                      <div class="more_special"><a href="topics.html">查看更多</a></div>
                 </div>
           </div>
        </div>
        <!--我要创建话题-->
        <div id="new_topics">
           <h2><a href="visitor/visitor_addArticle.do?acId=${category.acId}">我要创建话题</a></h2>
        </div>
         <!--小组最新话题-->
         <div id="groupNew_topics">
            <h2>小组最新话题</h2>
            
            
            <c:forEach var="art" items="${pageBean.objList }">
            <div class="groupNew_user">
              <img src="${art.puser.puPhoto}">
              <div><a href="users.html">${art.puser.puName }</a></div>
            </div>
            
            <div class="groupNew_content">
               <div class="g_contentTitle">
				<c:if test="${art.arType eq 1 }">
	               <img src="images/aex_userImg/icon_top.gif" align="left">
                  <img src="images/aex_userImg/icon_jing.gif" align="left">
				</c:if>
                <a href="visitor/visitor_article.do?arId=${art.arId}">${art.arTitle }</a></div>
               <div class="g_content">
                  <a  href="visitor/visitor_article.do?arId=${art.arId}">${art.arAbstract }</a> 
               </div>
               <div class="topics_info"><div id="topics_comment"> 回复 (${art.arComentCount })
               </div><div id="g_contentCount"> 浏览量 (${art.arViewCount })</div>
               <div id="topics_time">${art.arTime }</div></div>
            </div>
            </c:forEach>
         <!--页数-->
        <jsp:include page="/systemPage/paginationVisitor.jsp"></jsp:include>
        
        
     </div>
     </div>
     <div class="container_right">
     <!--加入或者退出小组--> 
        <div id="jion_out">
              <img width="50" height="50" src="${category.acPhoto}" align="left">
              <div class="group_name"><a href="javascript:void(0)">${category.acName}</a></div>
              <div class="group_introduction">
                   ${category.acDescription}
              </div>
              
     <%
     	ArticleCategory category=(ArticleCategory)request.getAttribute("category");
	     Set<CategoryEditer> set=null;
	     if(user!=null){
	     	set=(Set<CategoryEditer>)user.getCategoryEditers();
	     }
	     if(user!=null&&Ptool.userIsInCategory(set, category)){
    			out.print(" <div onclick='get(\"visitor/visitor_outCategory.do?type=2&acId="+category.getAcId()+"\")' class='out_jion'>退出小组</div>");
    		}else{
    			out.print("<div onclick='get(\"visitor/visitor_joinCategory.do?type=2&acId="+category.getAcId()+"\")' class='out_jion'>加入小组</div>");
    		}
     %>
        </div>
         <!-- 侧边栏 -->
  	 <jsp:include page="/systemPage/cbl1.jsp"></jsp:include>
       
        
     </div>
</div>
	
	
	<jsp:include page="/systemPage/footerVisitor.jsp"></jsp:include>
	
</body>

</html>
